package com.example.blog.dto.picture;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
@Data
public class AddPictureDto {
    @NotBlank(message = "图片分类不为空")
    @Length(max = 15,min = 1,message = "长度必须大于等于1或小于等于15")
    private String type;  // 图片分类
    private MultipartFile file; //图片地址
    @NotBlank(message = "描述不为空")
    @Size(max = 35, min = 1, message = "长度必须大于等于1或小于等于35")
    private String description; //图片描述
}
